-
Notifications
You must be signed in to change notification settings - Fork 8
Add run LLM widget #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add run LLM widget #330
Conversation
|
Docs preview site available at https://quixdocsdev.blob.core.windows.net/prdev/index.html |
|
Hi @tbedford thanks for opening this up again. I'm testing the preview site and am getting a 404 for the runllm-widget.js file. Perhaps you have more context on this than I do, the file should show here: I'm unfamiliar with your CI/CD process. Is there another step that needs to happen for this file to be included like the other files in the javascripts folder? Or is there a way you could upload the contents to that path so that we can test against this preview site? |
|
@agiron123 Thanks I can help with this, let me take a look. |
I got it working locally, the JS file was recommitted to an incorrect location, just need to figure out why the build isn't picking it up. |
|
@merlin-quix Thanks for the update here Merlin. Let me know if there is anything I can do here to help. |
@agiron123 Ok, it works now. You can see it online under this link: https://quixdocsdev.blob.core.windows.net/pr330/get-started/welcome.html Is there anything you need to do on your end to have it return answers? Note: there seem to be some key conflicts with our "regular" search box. When you press certain keys such as "c" or "f", the regular search box comes into focus, and the AI search disappears - but I'll try to fix this on our end. |
|
Thanks for all your help here @merlin-quix. As far as getting answers to show, I have gone ahead and whitelisted your domains: You should now be able to receive answers from our assistant. |
|
@merlin-quix Regarding configuring the hotkey, you can configure the RunLLM hotkey here:
In my testing, I found that the search bar of your production site pops up when I type the s or f key. (search and find, I assume). This, however, is taking the input focus away from the RunLLM Widget, making it impossible to type a question into the widget. This is a fun use case that I never really accounted for while developing the widget. I'm working on my end to ensure that all inputs are consumed by the widget once open. I'll let you know once that's ready. |
| {{ super() }} | ||
|
|
||
| <script src="javascripts/feedback.js"></script> | ||
| <script src="javascripts/runllm-widget.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the javascripts included from the mkdocs even running, or does this just override everything?
If this is how you wish to include the runllm widget script, we can remove the runllm-widget.js script and entry in mkdocs.yml and replace the line above with the following:
<script
defer
id="runllm-widget-script"
type="module"
src="https://cdn.jsdelivr.net/npm/@runllm/search-widget@stable/dist/run-llm-search-widget.es.js"
version="stable"
runllm-preset="mkdocs"
runllm-server-address="https://api.runllm.com"
runllm-assistant-id="111"
runllm-position="BOTTOM_RIGHT"
runllm-keyboard-shortcut="Mod+j"
runllm-slack-community-url="https://quix.io/slack-invite"
runllm-name="RunLLM"
></script>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agiron123 Thanks - It was my assumption (and perhaps I am wrong) that you had to update the override AND mkdocs.yml if you wanted the new Javascript to kick in or load it at a specific point. I will try your solution anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should just be one I believe, but it's hard to say definitively since people can set up their docs sites differently.
remove extraneous runllm-widget script tag

Description
This PR adds configuration for the RunLLM Widget.
In order to test this out in a staging / PR preview environment we will need to add the domain where the site is deployed to our database for reCAPTCHA verification.
If you could please provide the preview URL to us we can handle this on our end and we will comment here once resolved.
Please ping @agiron123 for this.
Without reCAPTCHA verification set up, the Widget will at least show up on the bottom right hand corner of the docs site.
Review
View the widget